@import './variables.scss';
.container {
  position: relative;
  width: 100%;
  height: 100%;
}
.components-list {
  box-sizing: border-box;
  height: 100%;
}
.components-title{
  font-size: 16px;
  color: #222;
  margin: 0 20px 20px;
  font-weight: 700;
  line-height: 24px;
}
.left-board {
  width: 260px;
  position: absolute;
  left: 0;
  top: $containerTop;
  padding-left: 10px;
  .el-card__body{
    padding: 0;
  }
}
.left-scrollbar{
  height: calc(100vh - #{$scrollHeight});
  overflow: hidden;
}
.center-scrollbar {
  max-height: calc(100vh - #{$scrollHeight} - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
}
.center-board {
  width: auto;
  margin: 0 $rightPanelWidth 0 260px;
  box-sizing: border-box;
}
.empty-info{
  text-align: center;
  font-size: 18px;
  color: #ccb1ea;
  letter-spacing: 4px;
}
.action-bar{
  position: relative;
  height: 42px;
  text-align: right;
  padding: 0 15px;
  box-sizing: border-box;;
  border: 1px solid #f1e8e8;
  border-top: none;
  border-left: none;
  .delete-btn{
    color: #F56C6C;
  }
}
.logo-wrapper{
  position: relative;
  height: 42px;
  background: #fff;
  border-bottom: 1px solid #f1e8e8;
  box-sizing: border-box;
}
.logo{
  position: absolute;
  left: 12px;
  top: 6px;
  line-height: 30px;
  color: #00afff;
  font-weight: 600;
  font-size: 17px;
  white-space: nowrap;
  > img{
    width: 30px;
    height: 30px;
    vertical-align: top;
  }
  .github{
    display: inline-block;
    vertical-align: sub;
    margin-left: 15px;
    > img{
      height: 22px;
    }
  }
}

.center-board-row {
  padding: 1px 15px 15px 15px;
  box-sizing: border-box;
}
.drawing-board {
  height: 100%;
  position: relative;
  .components-body {
    padding: 0;
    margin: 0;
    font-size: 0;
  }
  .sortable-ghost {
    position: relative;
    display: block;
    overflow: hidden;
    &::before {
      content: " ";
      position: absolute;
      display: block !important;
      left: 0;
      right: 0;
      top: 0;
      height: 3px;
      background: #1890ff;
      z-index: 2;
    }
  }
  .sortable-ghost *{
    display: none;
  }
  .components-item.sortable-ghost {
    width: 100%;
    height: 3px;
    // background-color: $selectedColor;
  }
  .el-card{
    .active-from-item {
      & > .el-form-item{
        background: $selectedColor;
        border-radius: 6px;
        border:1px dashed #1979fc;
      }
      & > .drawing-item-copy,
      & > .drawing-item-delete,
      & > .drawing-item-up,
      & > .drawing-item-down {
        display: initial;
      }
      & > .component-name{
        color: $lighterBlue;
      }
    }
  }
  .el-form-item{
    margin-bottom: 15px;
    border: 1px solid transparent;
  }
  .el-card__body{
    padding: 0px 5px 10px 5px;
  }
  .el-card__header {
    .el-col {
      margin-top: 0px;
    }
  }
}
.form-generator-wrap {
  .drawing-board {
    .el-card__header {
      padding: 7px 15px 7px;
    }
  }
}
.drawing-item{
  position: relative;
  cursor: move;
  &.undraggable {
    cursor: default;
  }
  &.hide {
    opacity: 0.3;
  }
  &.unfocus-bordered:not(.active-from-item) > div:first-child {
    border: 1px solid #eff1f4;
  }
  .el-form-item{
    padding: 5px 5px;
  }
}
.drawing-row-item{
  position: relative;
  cursor: move;
  box-sizing: border-box;
  border: 1px solid #eff1f4;
  border-radius: 3px;
  padding: 0 2px;
  margin-bottom: 15px;
  &.undraggable{
    cursor: default;
  }
  .drawing-row-item {
    margin-bottom: 2px;
  }
  .el-col{
    // margin-top: 22px;
    margin-top: 5px;
  }
  .ts-designer-td {
    .el-col{
      margin-top: 0px;
    }
  }
  .el-form-item{
    margin-bottom: 0;
  }
  .drag-wrapper{
    // min-height: 80px;
  }
  &.active-from-item{
    border: 1px dashed $lighterBlue;
    background: $selectedColor;
  }
  .component-name{
    position: absolute;
    top: 0;
    left: 0;
    font-size: 12px;
    color: #bbb;
    display: inline-block;
    padding: 0 6px;
  }
}
.drawing-item, .drawing-row-item{
  &:hover {
    & > .el-form-item{
      background: $selectedColor;
      border-radius: 6px;
    }
    & > .drawing-item-copy,
    & > .drawing-item-delete,
    & > .drawing-item-up,
    & > .drawing-item-down {
      display: initial;
    }
  }
  & > .drawing-item-copy,
  & > .drawing-item-delete,
  & > .drawing-item-up,
  & > .drawing-item-down {
    display: none;
    position: absolute;
    top: -10px;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    font-size: 12px;
    border: 1px solid;
    cursor: pointer;
    z-index: 10;
  }
  & > .drawing-item-copy{
    right: 56px;
    border-color: $lighterBlue;
    color: $lighterBlue;
    background: #fff;
    &:hover{
      background: $lighterBlue;
      color: #fff;
    }
  }
  & > .drawing-item-up {
    right: 88px;
    border-color: $lighterBlue;
    color: $lighterBlue;
    background: #fff;
    &:hover{
      background: $lighterBlue;
      color: #fff;
    }
    &.disabled {
      border-color: #ccc;
      color: #ccc;
      background: #fff;
      cursor: not-allowed;
      &:hover{
        background: #fff;
        color: #ccc;
      }
    }
  }
  & > .drawing-item-down {
    right: 56px;
    border-color: $lighterBlue;
    color: $lighterBlue;
    background: #fff;
    &:hover{
      background: $lighterBlue;
      color: #fff;
    }
    &.disabled {
      border-color: #ccc;
      color: #ccc;
      background: #fff;
      cursor: not-allowed;
      &:hover{
        background: #fff;
        color: #ccc;
      }
    }
  }
  & > .drawing-item-delete{
    right: 24px;
    border-color: #F56C6C;
    color: #F56C6C;
    background: #fff;
    &:hover{
      background: #F56C6C;
      color: #fff;
    }
  }
}
.flip-list-move {
  transition: transform 0.5s;
}

.form-generator,.form-parser {
  .el-card__header label{
    font-weight: 700;
  }
}

.drawing-item {
  &:hover {
    & > .el-form-item{
      background: $selectedColor;
      border-radius: 6px;
    }
  }
}
